package com.mida.dms.knw.service;

import com.mida.dms.knw.entity.KnwConceptualDomain;
import com.mida.dms.knw.entity.KnwSlot;
import com.mida.dms.knw.entity.vo.KnwSlotVo;
import com.mida.dms.knw.entity.vo.MapperPage;
import com.mida.dms.knw.util.exception.DtException;
import com.mida.dms.knw.vo.KnwSlotPageVo;
import com.mida.dms.knw.vo.PageResultVo;
import com.mida.tool.common.result.ActionResult;
import com.mida.tool.common.result.ListResult;

import java.util.List;

public interface KnwSlotService {

    /**
     * 更新slot对应编码体系(发布状态)
     * @param slotSoid
     * @param detailCodingSystemSoid
     * @return
     */
    ActionResult updateDetailCoding(Long slotSoid, Long detailCodingSystemSoid);

    /**
     * 发布本体
     * @param noumenonSoid
     * @param list
     * @return
     */
    ActionResult publish(Long noumenonSoid, List<KnwSlot> list);

    /**
     * 添加slot
     * @param knwSlot
     * @return
     */
    ActionResult add(KnwSlotVo knwSlot);

    /**
     * 分页查询
     * @param vo
     * @return
     */
    ListResult<PageResultVo<KnwSlotVo>> find(KnwSlotPageVo vo);

    /**
     * 根据slotSoid查询一条记录
     * @param soid
     * @return
     */
    ListResult<KnwSlotVo> findBySoid(Long soid);

    /**
     * 删除
     * @param vo
     * @return
     */
    ActionResult delete(KnwSlotVo vo) throws Exception;

    /**
     * 拖拽排序
     * @param originalSlotOrder
     * @param newSlotOrder
     * @param slotSoid
     * @return
     * @throws DtException
     */
    ActionResult order(Long originalSlotOrder, Long newSlotOrder, Long slotSoid) throws DtException;

    /**
     * 更新slot
     * @param vo
     * @return
     */
    ListResult<Object> update(KnwSlotVo vo) throws DtException;


    /**
     * Slot简码查询
     * @param vo
     * @return
     */
    ListResult<Object> selectSlotNameByCode(MapperPage vo);

    /**
     * 选中Slot名称后加载编码体系
     * @param vo
     * @return
     */
    ListResult<Object> getDataBySlotName(KnwSlotVo vo);

    ListResult<Object> getDataByDomainId(KnwConceptualDomain domain);

    ListResult<List<KnwSlotVo>> findAllSoltBynoumenonSoid(Long noumenonSoid);
}
